In modern operating systems, one or more threads (components of a process which execute tasks) may share common system resources. A data race condition occurs when two or more threads concurrently access a shared resource without synchronization. A data race condition may lead to data race errors where data stored on the shared resource may be different depending on the order in which the threads access the shared resource.
Synchronization is typically implemented using locks, mutexes, semaphores, or other synchronization objects. When one or more threads acquire a synchronization object before accessing a shared resource, the object synchronizes the threads' access to the shared resource, preventing data race conditions from occurring.
A data race condition may thus be removed by synchronizing thread access to a shared resource or by replicating the shared resource. Currently available tools that detect data race conditions, however, are incapable of providing or suggesting possible solutions for removing data race conditions. Systems and methods are needed to overcome the above-noted shortcomings.
Features, elements, and aspects of the invention that are referenced by the same numerals in different figures represent the same, equivalent, or similar features, elements, or aspects, in accordance with one or more embodiments.